list( $usec, $sec ) = explode( " ", $wgRequestTime );
$start = (float)$sec + (float)$usec;
$elapsed = $now - $start;
- if ( "" != $wgDebugLogFile ) {
+ if ( $wgProfiling ) {
$prof = wfGetProfilingOutput( $start, $elapsed );
$forward = "";
if( !empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) )
$log = sprintf( "%s\t%04.3f\t%s\n",
gmdate( "YmdHis" ), $elapsed,
urldecode( $_SERVER['REQUEST_URI'] . $forward ) );
- error_log( $log . $prof, 3, $wgDebugLogFile );
+ if ( "" != $wgDebugLogFile ) {
+ error_log( $log . $prof, 3, $wgDebugLogFile );
+ }
}
}
function get( &$article, &$user ) {
global $wgMemc;
+ $fname = "ParserCache::get";
+ wfProfileIn( $fname );
+
$hash = $user->getPageRenderingHash();
$pageid = intval( $article->getID() );
$key = $this->getKey( $article, $user );
} else {
$value = false;
}
+
+ wfProfileOut( $fname );
return $value;
}